//
//  UIViewController+YCTools.h
//  Pods
//
//  Created by Apple on 2022/11/3.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIViewController (YCTools)

@property (nonatomic, copy) void (^vcShowKeyBoardBlock) (CGFloat keyboardH);
@property (nonatomic, copy) void (^vcHideKeyBoardBlock) (void);

/// 调用此方法不用时要记得调用cancelKeyBoardNotification注销监听
/// - Parameters:
///   - showKeyBoardBlock: 显示键盘block
///   - hideKeyBoardBlock: 隐藏键盘block
- (void)registKeyBoardNotification:(void (^)(CGFloat keyboardH))showKeyBoardBlock hideKeyBoardBlock:(void (^)(void))hideKeyBoardBlock;

/// 注销键盘监听不用时注销监听
- (void)cancelKeyBoardNotification;

/// 获取keywindow最顶层的vc
+ (UIViewController *)getCurrentViewController;

@end

NS_ASSUME_NONNULL_END
